#!/usr/bin/env python
# encoding: utf-8
'''
@author: qiuyan
@contact: winston@peipeiyun.com
@file: wap_server.py
@time: 20120/2/13 6:27 PM
@desc:
'''

from sanic.response import html
from core.server import app
from core.temp_render import render


from sanic import Blueprint
static_bp = Blueprint("abc")
static_bp.static('/static', './static/')
static_bp.static('css', './static/css')
static_bp.static('img', './static/img')
app.blueprint(static_bp)

from middleware.auth import authorized
@app.middleware('request')
async def login_require(request):
    pass

@app.route("/")
async def index(request):
    content = render('templates/admin/index_splitter_tabstrip.html')
    return html(content)

if __name__ == '__main__':
    app.run(host="0.0.0.0", port=app.config['PORT'], debug=True)
